package my;

import com.opensymphony.xwork2.ActionSupport;

public class twst extends ActionSupport
{
	String mes ;
	String username ;
	String password ;
	String p = "";
	
	
	public String execute() throws Exception
	{
		//this.LOG.debug("333");
		this.LOG.info("username:"+getUsername()+"password:"+getPassword());
		//System.out.println("username:"+getUsername());
		//System.out.println("password:"+getPassword());
		
		if(this.getUsername() == null && this.getPassword() == null){
			this.setMes("welcome");
			p="login";
		}else if("tom".equals(this.getUsername()) && "1234".equals(this.getPassword())){
			this.setMes("登入成功");
			p="s";
		}else{
			this.setMes("打錯了拉");
			p="w";
		}
		
		return SUCCESS ;
	}
	
	public String getMes() {
		return mes;
	}
	public void setMes(String mes) {
		this.mes = mes;
	}
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
}

